<style type="text/css">
/*弹出层的STYLE*/
body {height:100%;}
.mydiv {
background:#ffffff;
text-align: center;
line-height: 40px;
font-size: 12px;
font-weight: bold;
z-index:10000001;
width: 750px;
height: auto;
left:50%;/*FF IE7*/
top: 50%;/*FF IE7*/
margin-left:-375px!important;/*FF IE7 该值为本身宽的一半 150 *2 =300 */
margin-top:-200px!important;/*FF IE7 该值为本身高的一半 60*2=120 */
margin-top:0px;
position:fixed!important;/*FF IE7*/
position:absolute;/*IE6*/
_top:       expression(eval(document.compatMode &&
            document.compatMode=='CSS1Compat') ?
            documentElement.scrollTop + (document.documentElement.clientHeight-this.offsetHeight)/2 :/*IE6*/
            document.body.scrollTop + (document.body.clientHeight - this.clientHeight)/2);/*IE5 IE5.5*/

}
 .blank15{height:15px; line-height:8px; clear:both; visibility:hidden;}
.mydiv table{margin:0 auto;padding:0 auto;}
.mydiv tr{padding:0;margin:0;}
.mydiv td{height:10px;font-size:14px;font-weight:normal;padding:0;margin:0;}

.bg {
background-color: #a6a6a6;
width: 100%;
height: 100%;
left:0;
top:0;/*FF IE7*/
filter:alpha(opacity=70);/*IE*/
opacity:0.7;/*FF*/
z-index:10000000;
position:fixed!important;/*FF IE7*/
position:absolute;/*IE6*/
_top:       expression(eval(document.compatMode &&
            document.compatMode=='CSS1Compat') ?
            documentElement.scrollTop + (document.documentElement.clientHeight-this.offsetHeight)/2 :/*IE6*/
            document.body.scrollTop + (document.body.clientHeight - this.clientHeight)/2);/*IE5 IE5.5*/

}
.qb_left{float:left;width:80%;text-align:left;color:#fff;font-size:15px;}
.qb_right{float:right;width:20%;background:#f4f4f4;height:40px;line-height:40px;text-align:right;border-bottom:1px solid #eee;}
.qb_right a{text-decoration:none;color:#ff5a00;}
.demoTab{display:block;margin-top:10px;}
.demoTab tr td{padding:3px;font-size:12px;}
/*The END*/

</style>
<script type="text/javascript">
function showDiv(rec_id, inout_status, action_val)
{
document.getElementById('popDiv').style.display='block';
document.getElementById('bg').style.display='block';
var form_inout_check = document.forms['inout_check'];
//form_inout_check.elements['action_val'].value = action_val;
//form_inout_check.elements['inout_status'].value = inout_status;
//form_inout_check.elements['rec_id'].value = rec_id;
}

function closeDiv(){
document.getElementById('popDiv').style.display='none';
document.getElementById('bg').style.display='none';
var sels = document.getElementsByTagName('select'); 
 for (var i = 0; i < sels.length; i++) 
    {
		sels[i].style.visibility = '';     

    }
}




</script>


<div id="popDiv" class="mydiv" style="border:1px solid #bbb;display:none;">

<div class="qb_left" style="height:40px;line-height:40px;background:#f4f4f4;color:#000;font-size:16px;font-weight:bold;border-bottom:1px solid #eee;">&nbsp;&nbsp;运费模板选择</div><div class="qb_right" ><a href="javascript:closeDiv()" >关 闭</a>&nbsp;&nbsp;&nbsp;</div>
<div style="clear:both;"></div>
<div class="blank15"></div>
<form  method="post" name="demoForm" id="demoForm" action="store_manage.php" onsubmit="return CheckDemoList();" > 
<table cellpadding=1 cellspacing=1 width="90%" border=0 bgcolor=#cccccc class="demoTab">  
    <tr bgcolor="#eeeeee"> 
      <td width="10%"><input type="checkbox" onclick='listTable.selectAll(this, "checkboxes")'> 编号</td> 
      <!-- <td width="20%"> 运费模板名称</td> --> 
	   <td width="15%"> 物流名称</td>
	  <!-- <td width="15%"> 计费方式</td> -->
	  <td width="40%"> 计费说明</td>
    </tr>   
	{foreach from=$demo_list item=demo}
    <tr bgcolor=#ffffff> 
	 <td ><input type="checkbox" name="checkboxes[]" class="checkboxclass" value="{$demo.demo_id}" />{$demo.demo_id}</td> 
     <!-- <td > {$demo.demo_name}</td>  -->
	 <td > {$demo.shipping_name}</td>
	 <!-- <td > {$demo.compute_mode_name}</td> -->
	 <td > {$demo.fee_desc}</td>
    </tr> 
	{/foreach}
	</table> 
     <div class="blank15"></div>
	  <input type="hidden" value="shipping_area_fee_batch" name="act" >
	  <input type="hidden" value="{$shipping_region_id}" name="shipping_region_id" >
      <input type="submit"  value="确定" > 
</form> 
</div>
<script type="text/javascript" >
function CheckDemoList()
{
	var err = true; 
	$("input[name='checkboxes[]']").each(function(){
		if(this.checked){
			err = false;
		}
	});

	if (err)
	{
			alert('您一个都没选择');
	}
	if(document.getElementById('areaform')){
		var str = '';
		$('.areacb').each(function(){
			if(this.checked){
				str+=this.value+',';
			}
		})
		if(str == ''){
			err = true;
			alert('请为运费模板选择区域地址!');
		}else{
			$("input[name='act']").val('shipping_area_fee_batch_new');
			$("input[name='shipping_region_id']").val(str);
		}
	}
	return !err;
}
</script>